// ignore_for_file: deprecated_member_use

import 'package:flutter/material.dart';
import 'package:flutter_widget/custom/custom_appbar.dart';

// ignore: must_be_immutable
class FlexPage extends StatelessWidget {
  String name;
  FlexPage({Key? key, required this.name}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CustomAppbar(name, Theme.of(context).primaryColor),
      body: Center(
          child: Flex(
        direction: Axis.horizontal,
        children: [
          Expanded(
            child: Container(color: Colors.red),
            flex: 1,
          ),
          Expanded(
            child: Container(color: Colors.green),
            flex: 2,
          ),
          Expanded(
            child: Container(
              color: Colors.blue,
              height: 200,
              width: 600,
            ),
          ),
        ],
      )),
    );
  }
}
